﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CommonUtil
{
    /// <summary>
    /// 系统信息类
    /// </summary>
    public class SysMessage
    {
        /// <summary>
        /// 获取系统代码信息
        /// </summary>
        /// <param name="msgCode">信息/错误代码</param>
        /// <returns>系统信息字符串</returns>
        public static string GetSysMsg(string msgCode)
        {
            string msg = "";
            try
            {                
                string sql = string.Format("SELECT SysMes FROM TSysMessage WHERE SysId='{0}'", msgCode);
                msg = SqlHelper.ExecuteScalar(sql).ToString();
            }
            catch (Exception ex)
            {
                Logger.DefaultLog("获取系统代码信息异常：" + ex.Message + ex.StackTrace, LogType.Error);
            }
            return msg;
        }
    }
}
